
#pragma once
#include <arpa/inet.h>
#include <stdlib.h>
#include <strings.h>
#include <sys/socket.h>
#include <unistd.h>
#include <cstdint>
#include <string>

class InetAddress {
public:
    InetAddress(uint16_t port = 8080, std::string ip = "0.0.0.0");

    InetAddress(sockaddr_in address);

    sockaddr_in Address();

    std::string Ip();

    uint16_t Port();

    std::string IpPort();

    void SetAddress(struct sockaddr_in address);

private:
    struct sockaddr_in address_;
};